package cn.blnp.net.flowable.task.service.server;

import org.flowable.engine.RuntimeService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * <h3></h3>
 *
 * @author <a href="mailto:blnp.yibin@qq.com">lyb</a>
 * @version 1.0
 * @since 2025/5/13 13:56
 */
@Component("secondServer")
public class SecondServer {

    @Resource
    private RuntimeService runtimeService;

    /**
     *  <p>
     *      使用这种方式访问Flowable服务的API，造成的所有数据变更都发生在当前事务中。
     *  </p>
     **/
    public void start() {
        runtimeService.startProcessInstanceByKey("myProcess");
    }
}
